# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-numpy
_pkgname=numpy
pkgver=1.16.6
pkgrel=3
pkgdesc='The fundamental package for array computing with Python.'
url='https://pypi.org/project/numpy/#files'
arch=('x86_64' 'aarch64')
license=('custom:unknown')
depends=('python2' 'lapack' 'cblas')
makedepends=('python2-setuptools' 'cython2' 'gcc-fortran')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.zip")
sha512sums=('c219841cc804c194a38b8e046b83265b8b7a35be8f33d68561ef17b085465dd11bd1e84fe1baea809af0efb09a9b13283f13728d125fcdd2221c30ec23fd0a50')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1

  mv "$pkgdir/usr/bin/f2py" "$pkgdir/usr/bin/f2py2"
}

